

Tesis.loading = {}

Tesis.loading.show = function(texto){

    //if (!Tesis.loading.panel) {
        Tesis.loading.panel = new YAHOO.widget.Panel("loading-panel", {
            width: "220px",
            fixedcenter: true,
            close: false,
            draggable: false,
            zindex:4,
            modal: true,
            visible: false
        });
            
        var header = 'Procesando, espere por favor... ' + (texto ? texto : '');
        Tesis.loading.panel.setHeader(header);
        Tesis.loading.panel.setBody("<div class='bar'>&nbsp;</div>");
        Tesis.loading.panel.render(document.body);
    //}
    Tesis.loading.panel.show();
}

Tesis.loading.hide = function(){
    Tesis.loading.panel.destroy()
}